<?php

 /*
 * Smarty plugin
 * -------------------------------------------------------------
 * Type:     function
 * Name:     const
 * Version:  0.1
 * Date:     August 18, 2002
 * Author:	 Alexei Saveliev <alexei@saveliev.org>
 * Purpose:  display constant
 * Input:    name = name of constant
 * 
 * Examples: {const name=MSG_MYMESSAGE}
 * -------------------------------------------------------------
 */

function smarty_function_const($params, &$smarty)
{
	echo defined($params['name']) ? constant($params['name']) : $params['name'];
}

?>
